<?php
namespace app\zhengmaotongadmin\validate;
use think\Validate;

class BannerValidate extends Validate
{
    //定义验证规则
    protected  $rule=[
        'url'=>'require',
    ];
    //定义验证失败时的提示信息
    protected $message = [
        'url.require'=>'标题不能为空',
    ];
    //验证场景
    protected $scene=[
        'add'=>['url'],
        'edit'=>['id','url'],
    ];
}